import requests
import json
#1.登录
r = requests.post('https://api.zoomeye.org/user/login',data=json.dumps({"username": "YourLoginUserName",
    "password": "YourLoginPassword"}))
#2.获得token
a = r.content
#3.使用token 记得token前面加个JWT
headers = {"Authorization": "JWT eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZGVudGl0eSI6Imo0NTQzNTE5QGhvdG1haWwuY29tIiwiaWF0IjoxNTg4MzE0MjYzLCJuYmYiOjE1ODgzMTQyNjMsImV4cCI6MTU4ODM1NzQ2M30.nPTGSwCO1Da4p7zZiTg7atsiDbTAbRaxW2RPLD5U7gQ"}
g = requests.get('https://api.zoomeye.org/web/search?query=city:beijing%20app:DedeCMS&page=1&facets=app,os',headers=headers)
#4.查询
b = g.content
print(b)
"""
https://api.zoomeye.org/web/search?query=
https://api.zoomeye.org/host/search?query=
https://api.zoomeye.org/both/search bothsearch需要充钱
"""